package main

import (
	"fmt"
	"math"
)

func main() {

	n1 := []int{3, 7, 2}
	n2 := []int{1, 7}

	var sum1, sum2 int
	m1, m2 := make(map[int]struct{}), make(map[int]struct{})
	for _, n := range n1 {
		sum1 += n
		m1[n] = struct{}{}
	}

	for _, n := range n2 {
		sum2 += n
		m2[n] = struct{}{}
	}

	diff := int(math.Abs(float64(sum1 - sum2)))

	for n := range m1 {
		n2 := diff - n
		if _, ok := m2[n2]; ok {
			fmt.Println(n, n2)
			return
		}
	}
}
